﻿using System.ComponentModel.DataAnnotations;

namespace Yz.Base
{
    /// <summary>
    /// 基础BaseEntity
    /// </summary>
    public class BaseEntity : BaseModel
    {
        [Key]
        public int Id { get; set; }
    }
    /// <summary>
    /// 带更新信息的Entity
    /// </summary>
    public class UpdateEntity : BaseEntity
    {
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; } = DateTime.Now;
    }

    public class BaseEntityKey : BaseModel
    {
        /// <summary>
        /// Guid去除-之后的字符串
        /// </summary>
        [Key]
        [MaxLength(32)]
        public string Id { get; set; }
    }
    public class UpdateEntityKey : BaseEntityKey
    {
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; } = DateTime.Now;
    }

    public class BaseEntityLong : BaseModel
    {
        /// <summary>
        /// Guid去除-之后的字符串
        /// </summary>
        [Key]
        public long Id { get; set; }
    }
    public class UpdateEntityLong : BaseModel
    {
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; } = DateTime.Now;
    }

}
